package com.mall4j.cloud.coupon.service.impl;

import com.mall4j.cloud.api.product.vo.AttrVO;
import com.mall4j.cloud.common.database.dto.PageDTO;
import com.mall4j.cloud.common.database.util.PageAdapter;
import com.mall4j.cloud.common.database.util.PageUtil;
import com.mall4j.cloud.common.database.vo.PageVO;
import com.mall4j.cloud.common.security.AuthUserContext;
import com.mall4j.cloud.coupon.mapper.CouponConfigMapper;
import com.mall4j.cloud.coupon.model.CouponConfig;
import com.mall4j.cloud.coupon.service.CouponConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CouponConfigServiceImpl implements CouponConfigService {
    @Autowired
    private CouponConfigMapper couponConfigMapper;
    @Override
    public PageVO<CouponConfig> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO,()->couponConfigMapper.list());
    }

    @Override
    public void save(CouponConfig config) {
        couponConfigMapper.save(config);
    }
}
